NewGenLib Installation on Linux
This tutorial explains the installation of NGL on Linux platforms. This works well for *RedHat *CentOS *Fedora *Ubuntu *Debian Important note In any Linux operating system when you login, you have your home directory. For example: If you loggin in as abc then there is a directory called /home/abc. This directory is called the home directory of the user abc. Hence this installation notes will refer to this home directory as HOME directory Secondly it is important that you have the password of the super user root for the installation procedure. Pre-requisities for the installation of NGL Installation of Java SDK *Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html if you want to download from your terminal use the below command wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u43-b01/jdk-6u43-linux-x64.bin" *Download Java SE 6 Update XX (XX is the update number). This page will also contain Java 7, do not download it. NGL works on Java SE 6 only. Its not yet tested for Java SE 7 *Download Java SE SDK 6 *You will find downloads for Linux. Please note that there are 2 types of downloads for Linux jdk-6uXX-linux-i586-rpm.bin and jdk-6uXX-linux-i586.bin. The file name ending with .rpm.bin is best suited for RedHat, CentOS and Fedora. The file name ending with .bin only is suited for Ubuntu and Debian *After downloading the file, place the file in your HOME directory *Right click on the downloaded file and in properties set its permission as a file that can be executed. Or use the below command Ubuntu/Debian chmod 777 HOME directory/jdk-6uXX-linux-i586.bin RedHat/CentOS/Fedora chmod 777 HOME directory/jdk-6uXX-linux-i586.rpm.bin *To run the file use the below command Ubuntu/Debian ./jdk-6uXX-linux-i586.bin RedHat/CentOS/Fedora ./jdk-6uXX-linux-i586.rpm.bin *In Ubuntu and Debian java will be installed in the HOME directory. It means Java will be installed in /home/abc/jdk1.6.0_XX Please note this is your JAVA_HOME *In RedHat, CentOS and Fedora java will be installed in /usr/java/jdk1.6.0_XX Please note this is your JAVA_HOME Installation of Postgresql database server For RedHat, CentOS and Fedora (From GUI) #Go to Applications -> Add/Remove Software #Under Servers and Databases section you will find Postgresql. Install it For RedHat, CentOS and Fedora (From terminal) Command 1: su Command 2: yum install postgresql* For Ubuntu and Debain (From GUI) #Go to System -> Administration -> Synaptic Package Manager #Please note that for Ubuntu new releases Synaptic Package Manager is not installed by default. You must go to Ubuntu Software Center and install Synaptic Package Manager first #Select Postgresql server, postgreqsql and everything related to it for installation For Ubuntu and Debian (From terminal) Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg mainImport the repository signing key, and update the package lists wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ sudo apt-key add - sudo apt-get update Command 1: sudo -s Command 2: apt-get install postgresql8* Initialize database (Only for RedHat, Fedora and CentOS): Open Terminal Command 1: su Command 2: su - postgres Command 3: initdb Editing postgresql.conf and pg_hba.conf *In RedHat,CentOS,Fedora the above both files are present in /var/lib/pgsql/data *In Ubuntu/Debian the above both files are present in /etc/postgresql/8.X/main/ Editing postgresql.conf For RedHat/CentOS/Fedora use these commands from terminal to open postgresql.conf using nano text editor Command 1: su Command 2: su - postgres Command 3: nano /var/lib/pgsql/data/postgresql.conf Now search and go to the following properties and edit them as show listen_addresses='*' port=5432 If there are any hashes before the above lines remove them in your conf file Editing pg_hba.conf For RedHat/CentOS/Fedora use these commands from terminal to open pg_hba.conf using nano text editor Command 1: su Command 2: su - postgres Command 3: nano /var/lib/pgsql/data/pg_hba.conf Now go to bottom of the file you will find a line like this host all all 127.0.0.1/32 md5 Change it to host all all 127.0.0.1/32 trust Restart the postgres service In RedHat/Fedora/CentOS you can go to Administration -> System -> Services. Select Postgresql service and restart it In Ubuntu/Debian use the following commands Command 1: sudo /etc/init.d/postgresql restart Creating a database user We now need to create a postgres database user called newgenlib In RedHat/Fedora/CentOS Command 1: su Command 2: su - postgres Command 3: createuser newgenlib -P The system will now prompt to enter the password. Please use newgenlib as password for convenience. System will also prompt whether newgenlib is a super user, enter y (yes) for the same Installation of NGL Step 1: Now that we have made all the initital preperation for NGL Installation, let us now install NGL. Download the latest version of NGL from this link Step 2: This will download a file named InstallNGL3.0.zip file. Extract it into HOME directory. Let us say your home directory is /home/abc. After extracting this zip file you must see a directory InstallNGL3.0 in /home/abc Step 3: Give read/write permissions to this directory Command: chmod 777 /home/abc/InstallNGL3.0 -R Step 4: Using your favourite text editor open the file config.ini. This file is present in /home/abc/InstallNGL3.0/apache-ant-1.8.1/bin directory installation.directory=/home/abc/NGL3 This means that the NGL installation will be made in the directory /home/abc/NGL3. you may give choose any other directory as you wish. But for this example we will choose this directory. ServerIPAddress=localhost The IPAddress of the computer which is running Postgresql database. By default leave it as localhost. It means that Postgresql database server is running on this system itself. DatabasePort=5432 The Port on which your Postgresql Server is running. In most of the cases this port number is 5432. DefaultDatabase=postgres Do not edit this parameter. Postgresql 8.3 installation creates a default database called postgres DatabaseUserName=newgenlib The user we created DatabasePassword=newgenlib The password we gave while creating the user newgenlib source.location=/home/abc/InstallNGL3.0 This is the location which has NGL Installation files. restore.database=blank If you want to restore a blank NGL schema the above value is blank. If you want to restore a NGL backup(with data) instead of a blank schema then put the backup file in /home/abc/InstallNGL3.0/DBBackup directory. Instead of blank use original. Your parameter will look like this restore.database=original NewGenLib.Database=newgenlib Do not edit this parameter. If you want the database name to be something else you may change it here. NewGenLib.Database.UserName=newgenlib Do not edit this parameter. A new user with this name will be created NewGenLib.Database.Password=newgenlib Do not edit this parameter. The user will be created with this password. Save the changes made to config.ini Step 5: Running the installation script Command 1: export JAVA_HOME= Command 2: /home/abc/InstallNGL3.0/./Install.sh Once the installation is complete you will get a message Build successful Step 6: Give read-write permissions to NGL3 directory Command: chmod 777 /home/abc/NGL3 -R Step 7: Run the NGL Server (Apache Tomcat) Command 1: export JAVA_HOME= In this installation notes go to Java installation section. Details of JAVA_HOME is give there Command 2: /home/abc/NGL3/apache-tomcat-6.0.32/bin/./catalina.sh run This will start NGL Server (Apache Tomcat) Checking your installation (OPAC) Open a browser and type this address http://localhost:8080/newgenlibctxt If you are on a system that is not running NGL Server then, http://:8080/newgenlibctxt This will Open the OPAC home page Checking your installation (Librarian GUI) Open a browser and type this address http://localhost:8080/newgenlibctxt/LaunchApplication If you are on a system that is not running NGL Server then First install JRE 6 from http://www.oracle.com/technetwork/java/javase/downloads/index.html then http://:8080/newgenlibctxt/LaunchApplication System will first prompt to enter your IP Address and Port. Enter the ip address of the server in IP Address and leave the port as 8080 and click on "Ok" Now the login screen will open, use User Id: 1 and Password: abc to login